package com.zhw.cloud.server;

import org.springframework.stereotype.Component;

import feign.hystrix.FallbackFactory;

@Component
public class EurekaClientHystrix implements EurekaClient_1 {

	@Override
	public String getName() {
		return "Feign:sorry,eurekaClient server is closed";
	}

}
////另外一种实现方式，使用FallbackFactory
//@Component
//public class EurekaClientHystrix implements FallbackFactory<EurekaClient_1> {
//	@Override
//	public EurekaClient_1 create(Throwable arg0) {
//		return new EurekaClient_1(){
//			@Override
//			public String getName() {
//				return "Feign:sorry,eurekaClient server is closed----FallbackFactory";
//			}
//			
//		};
//	}
//
//}